package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.domain.DmcAppSleepDataRecord;
import com.csun.cmny.provider.model.dto.app.AppSleepDateQueryDto;
import com.csun.cmny.provider.model.vo.app.AppSleepDataRecordVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface DmcAppSleepDataRecordMapper extends Mapper<DmcAppSleepDataRecord> {

    /**
     * 条件查询历史数据
     * @param: [appSleepDateQueryDto]
     * @return: java.util.List<com.csun.cmny.provider.model.domain.DmcAppSleepDataRecord>
     */
    List<AppSleepDataRecordVo> getHistroySleepData(AppSleepDateQueryDto appSleepDateQueryDto);

    /**
     * 查询当月分数最高的一条记录
     * @param: [deviceId, month]
     * @return: com.csun.cmny.provider.model.domain.DmcAppSleepDataRecord
     */
    AppSleepDataRecordVo getHighestGradeDayDataByMonth(@Param("deviceId") Long deviceId, @Param("month") String month);

    /**
     * 查询当月分数最低的一条记录
     * @param: [deviceId, month]
     * @return: com.csun.cmny.provider.model.domain.DmcAppSleepDataRecord
     */
    AppSleepDataRecordVo getLowestGradeDayDataByMonth(@Param("deviceId") Long deviceId, @Param("month") String month);
}